#define _CRT_SECURE_NO_WARNINGS  1
#include<stdio.h>
#include<string.h>
#include<assert.h>
size_t my_strlen1(char* a)
{
	assert(a);
	size_t count = 0;
	while (*a++ != '\0')
	{
		count++;
	}
	return count;
}
size_t my_strlen2(char* a)
{
	assert(a);
	size_t count = 0;
	char* a1 = a;
	while (*a != '\0')
	{
		a++;
	}
	count =a-a1;
	return count;
}
size_t my_strlen3(char* a)
{
	assert(a);
	size_t count = 0;
	if (*a != '\0')
	{
		a++;
		count = 1;
	}
	else
	{
		return 0;
	}
	return count+my_strlen3(a);
}
char* my_strcat(char* a, char* b)
{
	assert(a);
	assert(b);
	char* a1 = a;
	while (*a != '\0')
	{
		a++;
	}
	do
	{
		*a++ = *b++;
	} while (*b != '\0');
	*a = *b;
	return a1;
}
int main()
{
	char a[20] = "zjy";
	char b[] = "nb";
	int count = strlen(a);
	printf("%d\n", count);
	int count1 = my_strlen1(a);
	printf("%d\n", count1);
	int count2 = my_strlen2(a);
	printf("%d\n", count2);
	int count3 = my_strlen3(a);
	printf("%d\n", count3);
	char* a1=my_strcat(a, b);
	printf("%s", a1);
	return 0;
}
